OTInetAddressToName
Determines the canonical name of the host associated with an
internet address.C INTERFACE
OSStatus OTInetAddressToName (InetSvcRef ref, InetHost addr, InetDomainName name);C++ INTERFACE
TInternetServices::AddressToName (InetHost addr, InetDomainName name);PARAMETERS
ref
- The internet services reference you obtained when you opened the TCP/IP service provider.
addr
- The IP address for which you want to determine the associated domain name in either dotted-decimal notation (for example, "12.13.14.15") or hexadecimal notation (for example, "0x0c0d0e0f").
name
- A character array you must allocate into which the function places the canonical name.
DESCRIPTION
If you call this function asynchronously, the TCP/IP service provider calls your notifier function with theT_DNRADDRTONAMECOMPLETE
completion event code when the function completes. Thecookie
parameter to the notifier function contains a pointer to theInetHost
structure you specified in theaddr
parameter. If you had more than one simultaneous outstanding call to theOTInetAddressToName
function, you can use this information to determine which call has completed execution.COMPLETION EVENT CODES
T_DNRADDRTONAMECOMPLETE
0x10000002 The OTInetAddressToName
function has completed.SEE ALSO
Use theOTInetStringToAddress
function (page 8-40) to determine the addresses associated with an IP domain name.You can use the
OTInetStringToHost
function (page 8-54) to put the address inInetHost
format.